mini-os: use BSD sys/queue.h instead of Linux list.h
authorIan Campbell <Ian.Campbell@citrix.com>
Tue, 31 Jan 2012 16:06:14 +0000 (16:06 +0000)
committerIan Campbell <Ian.Campbell@citrix.com>
Tue, 31 Jan 2012 16:06:14 +0000 (16:06 +0000)
commit1a4af67d32b1c39b73e09346203f3e12c00b9e41
treeee7058fc62cdec6fe3f3582a63f99f90bd05bb24
parentf17888fc962b5249f9b6b34f28a61998c3092018
mini-os: use BSD sys/queue.h instead of Linux list.h

The latter is GPL which makes the whole of mini-os GPL rather than BSD
as intended. In tree users are all GPL or GPL-compatible but we should
fix this so that mini-os is BSD. Do so by using the same BSD
sys/queue.h as we use in libxl.

Tested with the builtin mini-os test app and qemu stubdomain, both of which
appear to still function as expected.

Move tools/libxl/external and the associated sed script to
tools/include/xen-external to allow more sensible access from mini-os.

Also add s/NULL/0/ in the sed script due to NULL not always being
defined in stubdom code when mini-os/wait.h is included.

As well as the obvious ABI changes there are a few API updates
associated with the change:

  - struct rw_semaphore.wait_list is unused
  - remove_waiter needs to take the wait_queue_head

The latter requires a qemu update, so there is also a QEMU_TAG
update in this changeset.

I sprinkled some extra-emacs local variables around the files I edited
which didn't have them.

I think this should be backported to the stable branches since
external users of mini-os may have been mislead into thinking they
could safely link mini-os against GPL-incompatible code.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
25 files changed:
.hgignore
Config.mk
extras/mini-os/Makefile
extras/mini-os/blkfront.c
extras/mini-os/fbfront.c
extras/mini-os/include/list.h [deleted file]
extras/mini-os/include/sched.h
extras/mini-os/include/semaphore.h
extras/mini-os/include/wait.h
extras/mini-os/include/waittypes.h
extras/mini-os/lib/sys.c
extras/mini-os/lib/xmalloc.c
extras/mini-os/sched.c
extras/mini-os/xenbus/xenbus.c
tools/include/xen-external/README [new file with mode: 0644]
tools/include/xen-external/bsd-COPYRIGHT [new file with mode: 0644]
tools/include/xen-external/bsd-queue.3 [new file with mode: 0644]
tools/include/xen-external/bsd-sys-queue-h-seddery [new file with mode: 0755]
tools/include/xen-external/bsd-sys-queue.h [new file with mode: 0644]
tools/libxl/Makefile
tools/libxl/bsd-sys-queue-h-seddery [deleted file]
tools/libxl/external/README [deleted file]
tools/libxl/external/bsd-COPYRIGHT [deleted file]
tools/libxl/external/bsd-queue.3 [deleted file]
tools/libxl/external/bsd-sys-queue.h [deleted file]